import { createApp } from 'vue'
import router from './router'
import store from './store'
import App from './App.vue'
import {
    Layout,
    Menu,
    Row,
    Col,
    Card,
    Dropdown,
    Select,
    Checkbox,
    Tabs,
    Tag,
    Input,
    InputNumber,
    DatePicker,
    TimePicker,
    Radio,
    Tooltip,
    Space,
    Steps,
    Descriptions,
    Alert,
    Result,
    Statistic,
    Popconfirm,
    Popover,
    Table,
    Avatar,
    List,
    Progress,
    Switch,
    Modal,
    Rate,
    ConfigProvider,
    Empty,
    Spin,
    Drawer,
    Upload,
    Image,
    Tree,
    TreeSelect,
    Cascader,
    Calendar,
    Badge
} from 'ant-design-vue';
// import STable from '@surely-vue/table';
import {ProProvider, TransformVnode,} from '@/components';
import { GridAuto,Has,Commit } from '@/directive';
import { useIcons } from '@/icons';
import { useModals } from "@/modals";
import Authority from './utils/authority/authority.vue';
import 'xe-utils'
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'
// import '@surely-vue/table/dist/index.less'
import './app.less';
import 'lib-flexible'
// vant 以下四个需手动引入样式，自动导入插件识别不了
// Toast
import { showToast } from 'vant';
import 'vant/es/toast/style';
// Dialog
import { showDialog } from 'vant';
import 'vant/es/dialog/style';
// Notify
import { showNotify } from 'vant';
import 'vant/es/notify/style';
// ImagePreview
import { showImagePreview } from 'vant';
import 'vant/es/image-preview/style';
// import './router/router-guards';
import MyError from '@/error/MyError';
import decimalDeal from '@/components/decimal-deal/index'
import { Button,
    Form, 
    Field, 
    CellGroup,
    Divider,
    Collapse, 
    CollapseItem,
    Dialog
} from 'vant';
const app = createApp(App);
app
.use(router)
.use(store)
.use(Collapse)
.use(CollapseItem)
.use(Layout)
.use(Menu)
.use(Dialog)
.use(Row)
.use(Col)
.use(Card)
.use(Form)
.use(Dropdown)
.use(Select)
.use(Button)
.use(Button)
.use(Checkbox)
.use(Tabs)
.use(Tag)
.use(Input)
.use(Calendar)
.use(Badge)
.use(InputNumber)
.use(DatePicker)
.use(TimePicker)
.use(Radio)
.use(Tooltip)
.use(Space)
.use(Steps)
.use(Divider)
.use(Descriptions)
.use(Alert)
.use(Result)
.use(Statistic)
.use(Popconfirm)
.use(Popover)
.use(Table)
.use(Avatar)
.use(List)
.use(Progress)
.use(Switch)
.use(Modal)
.use(Rate)
.use(ConfigProvider)
.use(Empty)
.use(Spin)
.use(Drawer)
.use(Image)
.use(ProProvider)
.use(VXETable)
.use(Upload)
.use(Tree)
.use(TreeSelect)
.use(Cascader)
// .component(PageContainer.name, PageContainer)
.component(TransformVnode.name, TransformVnode)
.component(Authority.name, Authority)
// .component('TableColumn', TableColumn)
// .component('BusinessContent', BusinessContent);
useIcons(app);
useModals(app);
app.config.errorHandler = MyError
// app.config.decimal=decimal
app.config.globalProperties.decimalDeal=decimalDeal
// app.provide('decimalDeal',decimalDeal)
app.directive("GridAuto",GridAuto.gridAuto as any)
    .directive('GridModal',GridAuto.gridModal as any)
    .directive('Has',Has.has as any)
    .directive('Commit',Commit.commit as any)
app.mount('#app');
